<style lang="scss" scoped="">
	@import '../style.scss';


</style>
<template>
	<div class='my_card_outer' style="height:25vh">
		<div class='my_card' style="height:24vh;">
			<div class="my_card_title">
				<Icon type="md-stats" color='rgb(67,158,279)' class="my_card_icon" />PaaS租户类型
			</div>
			<div style="height:19vh" ref="myEchart">
				fdsf

			</div>
		</div>

	</div>

</template>

<script>
	import echarts from 'echarts'
	import config from '../config.js'
	export default {
		name: 'tenant_type_ratio',
		mounted() {
			// this.initChart();

		},
		methods: {
			initChart(input_data) {
				let hv = document.body.clientHeight / 100;
				var myChart = echarts.init(this.$refs.myEchart);
				var option = {

					tooltip: {
						trigger: 'item',
						formatter: "{a} <br/>{b} : {c} ({d}%)"
					},

					series: [{
						name: '租户类型占比',
						type: 'pie',
						radius: '80%',
						roseType: 'radius',
						center: ['50%', '50%'],
						data: [{
								value: input_data.tenant_type[0].type_n,
								name: '省级租户',
								itemStyle:{
									color:'rgb(67,158,255)'
								}
							},
							{
								value: input_data.tenant_type[2].type_n,
								name: '合作伙伴',
								itemStyle:{
									color:'rgb(0,173,180)'
								}
							},
							{
								value: input_data.tenant_type[1].type_n,
								name: '专业公司',
								itemStyle:{
									color:config.color[0]
								}
							}
						],
						itemStyle: {
							emphasis: {
								shadowBlur: 10,
								shadowOffsetX: 0,
								shadowColor: 'rgba(0, 0, 0, 0.5)'
							}
						}
					}]
				};

				myChart.setOption(option, true);
			}
		}
	}
</script>
